package com.bgs.controller;


import com.bgs.common.R;
import com.bgs.pojo.Comments;
import com.bgs.service.BeforeUserService;
import com.bgs.service.CommentsService;
import com.bgs.service.TokenUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 评论表 前端控制器
 * </p>
 *
 * @author Asia
 * @since 2021-09-14
 */
@RestController
@RequestMapping("/bgs/comments")
public class CommentsController {
    @Resource
    private CommentsService commentsService;

    @GetMapping("zeroOrderDetailIdToFindComments")
    public R zeroOrderDetailIdToFindComments(Integer orderDetailId, Integer beforeUserId) {
        return commentsService.zeroOrderDetailIdToFindComments(orderDetailId, beforeUserId);
    }

    @GetMapping("zeroCircleIdToFindComments")
    public R zeroCircleIdToFindComments(Integer circleId, Integer beforeUserId) {
        return commentsService.zeroCircleIdToFindComments(circleId, beforeUserId);
    }

    @GetMapping("zeroEvaluateIdToFindComments")
    public R zeroEvaluateIdToFindComments(Integer evaluateId) {
        return commentsService.zeroEvaluateIdToFindComments(evaluateId);
    }

    @PostMapping("zeroAddOrderDetailIdComments")
    public R zeroAddOrderDetailIdComments(@RequestBody Comments comments) {
        return commentsService.zeroAddOrderDetailIdComments(comments);
    }

    @PostMapping("zeroAddCircleIdComments")
    public R zeroAddCircleIdComments(@RequestBody Comments comments) {
        return commentsService.zeroAddCircleIdComments(comments);
    }

    @PostMapping("zeroAddEvaluateIdComments")
    public R zeroAddEvaluateIdComments(@RequestBody Comments comments) {
        return commentsService.zeroAddEvaluateIdComments(comments);
    }

    @GetMapping("zeroDeleteCommentsId")
    public R zeroDeleteCommentsId(Integer commentsId) {
        return commentsService.zeroDeleteCommentsId(commentsId);
    }

    @GetMapping("zerobeforeUserIdToFindComments")
    public R zerobeforeUserIdToFindComments(Integer beforeUserId) {
        return commentsService.zerobeforeUserIdToFindComments(beforeUserId);
    }
}